//===============================================================================
//	CPing.cpp
//	ping
//===============================================================================

#include "CPing.h"

//-------------------------------------------------------------------------------
CPing::CPing(uint32_t uid, uint32_t pn)
	: BaseMessage(uid, pn)
{
	_safe_guard_begin;
	_safe_guard_end;
}

//-------------------------------------------------------------------------------
CPing::~CPing()
{
}

//-------------------------------------------------------------------------------
void CPing::SetPingTime(uint32_t ch, uint32_t cl, uint64_t server_time)
{
	_safe_guard_begin;

	m_jv["ch"] = ch;
	m_jv["cl"] = cl;
	m_jv["sh"] = (uint32_t)(server_time >> 32);
	m_jv["sl"] = (uint32_t)(server_time & 0xFFFFFFFF);

	_safe_guard_end;
}
